home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: MegaDisc / MegaDisc 36 (1993-11)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2).zip / MegaDisc 36 (1993-11)(MegaDisc Digital Publishing)(AU)(Disk 2 of 2).adf / ARexx / Modular / MakeMenu.mod < prev    next >
Text File  |  1993-08-19  |  1KB  |  28 lines

  1.     /*  Build a Menu  */
  2.     MakeMenu:
  3.     a = 'Enter menu name'
  4.     menuname = Request(100,40,a,'','Okay','Cancel')
  5.     if menuname ~= '' then do
  6.      call AddMenu(HO,menuname || '     ')
  7.      a = 'Enter menu item names, with a comma between each'
  8.      b = 'First item,second item,etc'
  9.      itemlist = Request(50,40,a,b,'Okay','Cancel')
  10.      do while itemlist ~= ''
  11.        parse var itemlist item ',' itemlist
  12.            call AddItem(HO,item,'%l %m %i')
  13.        end
  14.      end
  15.      a = 'How about building, just for fun, a further menu\'||,
  16.          'containing an (inactive) list of the names of all\'||,
  17.          'the modules that are called by this program?'
  18.      ModList = Request(100,40,a,,'Okay','Cancel')
  19.      if ModList = 'OKAY' then do
  20.        if ~exists('lis') then address command 'list >lis #?.mod quick'
  21.        call AddMenu(HO,'Module List  ')
  22.        op = open('ml','lis','r')
  23.        do n = 1 to 17
  24.         e = readln('ml') ; call AddItem(HO,e,'%l %m %i')
  25.         end
  26.        end
  27.     return
  28.